package com.demo.repository.routing;

import com.demo.repository.config.DynamicDataSourceHolder;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * @author Administrator
 */
public class Db1DatasourceRouting extends AbstractRoutingDataSource {


    @Override
    protected Object determineCurrentLookupKey() {
        return DynamicDataSourceHolder.getDB();
    }
}
